//处理用户注册逻辑
const db = require("../lib/db")
function addUser(userId,username,headImg,createTime,desc){
    return new Promise((resolve,reject)=>{
        let sql = "select * from adduser";
        let sqlstr = "insert into users(userId,userName,headImg,createTime,adduser_desc)values(?,?,?,?,?)";
        db.querySql(sql,sqlstr).then(data=>{
            if(data.length==0){
                resolve(505)
            }else{
               resolve(506)
            }
        })
    })
}
module.exports=addUser;